package com.jbit.utils;

public class ResponseEntity {
    private String success;
    private String errorCode;
    private String msg;
    private Object data;

    private ResponseEntity() {
    }

    public static ResponseEntity sendError(String errorCode) {
        ResponseEntity entity = new ResponseEntity();
        entity.errorCode = errorCode;
        return entity;
    }

    public static ResponseEntity sendSuccess(Object data) {
        ResponseEntity entity = new ResponseEntity();
        entity.data = data;
        entity.errorCode = "0000";
        return entity;
    }

    public static ResponseEntity sendUnLogin() {
        ResponseEntity entity = new ResponseEntity();
        entity.errorCode = "0001";
        return entity;
    }

    public String getSuccess() {
        return success;
    }

    public void setSuccess(String success) {
        this.success = success;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
